package com.zcah.sensitive.common.config;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.env.Environment;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DriverManagerDataSource;

import javax.sql.DataSource;
@Configuration
public class HiveConfig {

   /* @Bean(name = "hiveTemplate")
    public JdbcTemplate jdbcTemplate(@Qualifier(value = "hiveDS") DataSource hiveDatasource) {
        return new JdbcTemplate(hiveDatasource);
    }


    @Bean(name = "hiveDS")
    @ConfigurationProperties(prefix = "spring.hive")
    public DataSource hiveDatasource() {
        return DataSourceBuilder.create().type(ComboPooledDataSource.class).build();
    }
*/
}
